/**********************************************************************************************/
/* FBL_EscapeString.h																		  */
/*                                                                       					  */
/* Copyright Paradigma, 1993-2006                                        					  */
/* All Rights Reserved.                                                 					  */
/**********************************************************************************************/

#ifndef _FBL_EscapeString_h
	#define _FBL_EscapeString_h
#pragma once

#include <VShared/FBL/publ/Headers/FBL.h>

// FINAL:
#include <VShared/FBL/publ/Headers/FBL_pre_header.h>


/**********************************************************************************************/
FBL_Begin_Namespace


/**********************************************************************************************/
/// Prepends ', \, %, _ characters in the input string with \ (backslash); 
/// inRegEx parameter allows to escape some characters used when 
/// building RegEx expression ( [, ], (, ) ); note that this function 
/// dynamically allocates memory for the resulting string, 
/// so the returned UChar* pointer must be freed (with FreeString()) to avoid 
/// memory leak.
/// 
FBL_SHARED_EXP UChar* EscapeStringU( const UChar* inStr, bool inRegEx );
FBL_SHARED_EXP char* EscapeStringA( const char* inStr, bool inRegEx );


/**********************************************************************************************/
// Deallocates dynamically allocated by EscapeString() memory.
//
FBL_SHARED_EXP void FreeStringU( UChar* inStr );
FBL_SHARED_EXP void FreeStringA( char* inStr );


/**********************************************************************************************/
FBL_End_Namespace

#include <VShared/FBL/publ/Headers/FBL_post_header.h>

#endif // _FBL_EscapeString_h
